<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

	<xsl:template match="formConstructor">
		<form action="{@actionURL}" name="{@formName}" id="{@formName}" method="{@formMethod}">
			<xsl:if test="field[@type='formFileUpload']">
				<xsl:attribute name="enctype">multipart/form-data</xsl:attribute>
			</xsl:if>
			<input name="{@formName}IsSubmit" type="hidden" value="1"/>
			<table class="sqlTable" cellpadding="3">
				<thead><tr>
					<th colspan="2"><xsl:value-of select="@formTitle" /></th>
				</tr></thead>
				<tbody>
					<xsl:apply-templates select="field" />
				</tbody>
			</table>
		</form>
	</xsl:template>

	<xsl:template name="fieldTitle">
		<xsl:if test="position() mod 2 = 0">
			<xsl:attribute name="class">light</xsl:attribute>
		</xsl:if>
		<td width="50%">
			<xsl:value-of select="@title" />
			<xsl:if test="@error">
				<img src="{$imagesURL}error_icon.gif" align="absmiddle" hspace="5" />
			</xsl:if>
			<xsl:if test="@description != ''">
				<br/><small><xsl:value-of select="@description" /></small>
			</xsl:if>
		</td>
	</xsl:template>

</xsl:stylesheet>